<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2017/1/3
 * Time: 13:33
 */

//pathinfo — 返回文件路径的信息
//mixed pathinfo ( string $path [, int $options = PATHINFO_DIRNAME | PATHINFO_BASENAME | PATHINFO_EXTENSION | PATHINFO_FILENAME ] )

// 'dirname' =>
//  string(37) "E:\PHPSRC\test-src\PHPTEST\2017\01\03"
//  'basename' =>
//  string(21) "function.pathinfo.php"
//  'extension' =>
//  string(3) "php"
//  'filename' =>
//  string(17) "function.pathinfo"
$pathinfo = pathinfo( __FILE__ );
var_dump($pathinfo);
echo pathinfo(__FILE__,PATHINFO_FILENAME).PHP_EOL;
echo pathinfo(__FILE__,PATHINFO_EXTENSION).PHP_EOL;